package cn.edu.scau.dropship.mapper;

import cn.edu.scau.dropship.entity.Wish_goodsExample;
import cn.edu.scau.dropship.entity.Wish_goodsKey;
import java.util.List;
import org.apache.ibatis.annotations.Arg;
import org.apache.ibatis.annotations.ConstructorArgs;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface Wish_goodsMapper {
    @SelectProvider(type=Wish_goodsSqlProvider.class, method="countByExample")
    long countByExample(Wish_goodsExample example);

    @DeleteProvider(type=Wish_goodsSqlProvider.class, method="deleteByExample")
    int deleteByExample(Wish_goodsExample example);

    @Delete({
        "delete from wish_goods",
        "where goods_id = #{goodsId,jdbcType=INTEGER}",
          "and wish_id = #{wishId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Wish_goodsKey key);

    @Insert({
        "insert into wish_goods (goods_id, wish_id)",
        "values (#{goodsId,jdbcType=INTEGER}, #{wishId,jdbcType=INTEGER})"
    })
    int insert(Wish_goodsKey record);

    @InsertProvider(type=Wish_goodsSqlProvider.class, method="insertSelective")
    int insertSelective(Wish_goodsKey record);

    @SelectProvider(type=Wish_goodsSqlProvider.class, method="selectByExample")
    @ConstructorArgs({
        @Arg(column="goods_id", javaType=Integer.class, jdbcType=JdbcType.INTEGER, id=true),
        @Arg(column="wish_id", javaType=Integer.class, jdbcType=JdbcType.INTEGER, id=true)
    })
    List<Wish_goodsKey> selectByExample(Wish_goodsExample example);

    @UpdateProvider(type=Wish_goodsSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Wish_goodsKey record, @Param("example") Wish_goodsExample example);

    @UpdateProvider(type=Wish_goodsSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Wish_goodsKey record, @Param("example") Wish_goodsExample example);
}